package redes.servidor.impl;

import java.io.IOException;
import java.net.DatagramSocket;

public class Servidor {
	
	private DatagramSocket server;
	public DatagramSocket getServer() {
		return server;
	}

	private int port;
	private static Servidor instance;
	
	private Servidor() throws IOException{
		port = 123;
		server = new DatagramSocket(port);
	}
	
	public static Servidor getInstance() throws IOException{
		if(instance == null){
			instance = new Servidor();
			return instance;
		}else{
			return instance;
		}
	}

}
